<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('警示教训')" />
    </head>
    <body class="febs-container" id="febs-baseCautionaryLesson">
        <div class="febs-body layui-fluid"  lay-title="警示教训" >
            <div class="febs-body-search">
                <form class="jhg-body layui-form layui-table-form" lay-filter="baseCautionaryLesson-table-form" id="baseCautionaryLesson-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" id="baseArea-tenant" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" >
                                        <select name="tenantSelect" id="tenantSelect" lay-search="" >
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${tenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">警示来源</label>
                                    <div class="layui-input-inline" >
                                        <select name="cautionarySource" id="cautionarySource">
                                            <option value="">全部</option>
                                            <option value="1">事故管理</option>
                                            <option value="2">违章记分</option>
                                            <option value="3">隐患上报</option>
                                            <option value="4">安全检查</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">警示标题</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" name="cautionaryTitle" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">部门</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" name="cautionaryDept" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <table lay-filter="baseCautionaryLessonTable" id="baseCautionaryLessonTable'}" lay-data="{id: 'baseCautionaryLessonTable'}"></table>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="baseCautionaryLesson-toolbar">
            <!--<div lay-event="add" class="layui-btn layui-btn-sm" shiro:hasPermission="baseCautionaryLesson:add">
                <em class="layui-icon">&#xe654;</em> 新增
            </div>-->
            <div lay-event="qdExport" class="layui-btn layui-btn-sm ">
                <em class="layui-icon">&#xe82a;</em> 签到表下载
            </div>
        </script>
        <script data-th-inline="javascript">
            var hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
            var tenantList = [[${tenantList }]];
        </script>
        <script type="text/html" id="baseCautionaryLesson-tool">
            <span shiro:lacksPermission="baseCautionaryLesson:edit,baseCautionaryLesson:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
            <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="baseCautionaryLesson:edit">
                <i class="layui-icon layui-icon-edit"></i>
                学习
            </button>
            <button type="button"  class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="baseCautionaryLesson:delete">
                <i class="layui-icon layui-icon-delete"></i>
                删除
            </button>
        </script>
        <script th:src="@{/febs/js/base/baseCautionaryLesson/baseCautionaryLessonList.js(v=1)}"></script>
    </body>
</html>